﻿
using System.ServiceModel;

using System.ServiceModel.Channels;
using AdventureWorks.Services;
namespace GeneralTest
{
    public class RestHostVersion3 : ServiceHost
    {
        public RestHostVersion3()
            : base(typeof(IProductService))
        {
            var b = new CustomBinding();
            var m = new TextMessageEncodingBindingElement() { MessageVersion = MessageVersion.None };
            b.Elements.Add(m);
            var httpBinding = new HttpTransportBindingElement();
            b.Elements.Add(httpBinding);
            var endPoint = this.AddServiceEndpoint(typeof(IProductService), b, "http://localhost:7080/test3");
        }
    }
}
